<!--河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
-->
<template>
  <div class='app-container'>
    <el-form ref="form" :model="s_product" :rules="rules" label-width="100px" id="mvcfm">
      <el-button @click="gotoPage('BE7736AB654848269DB0F1AA8E3ACC91?'+vueparams+'')" type='primary' size="mini">差异提交</el-button>
      <el-button @click="gotoPage('BE7736AB654848269DB0F1AA8E3ACC91?'+vueparams+'')" type='primary' size="mini"><i class='fa fa-reply'></i>返回</el-button>
      <div class="form-unit">
        <span class="mvc-title-left"> 盘存差异产品 </span>
      </div>
      <el-table :data="s_product">
        <el-table-column label="产品条形码" prop="product_barcode">
          <template slot-scope="scope">
          </template>
        </el-table-column>
        <el-table-column label="产品名称" prop="product_name">
        </el-table-column>
        <el-table-column label="规格型号" prop="product_model">
        </el-table-column>
        <el-table-column label="产品位置" prop="product_norm">
        </el-table-column>
        <el-table-column label="累积数量" prop="product_num">
        </el-table-column>
        <el-table-column label="实际盘存数" prop="take_num">
        </el-table-column>
        <el-table-column label="差异处理" prop="take_process">
        </el-table-column>
        <el-table-column label="盘存结论" prop="take_verdict">
        </el-table-column>
        <el-table-column label="状态" prop="">
        </el-table-column>
      </el-table>
    </el-form>
  </div>
</template>
<script>
  import request from '@/utils/request'
  export default {
    name: 'InventoryDifList',
    components: {},
    props: ['popparams'],
    data() {
      return {
        vueparams: this.getVUEParams(""),
        s_product: [],
        loading: false,
        rules: {}
      }
    },
    created() {
      this.getData();
    },
    updated() {},
    mounted() {},
    methods: {
      getData() {
        request({
          method: 'get',
          url: '/xcapi/VUEAction/psi/main/InventoryAction/inventoryDifList?' + this.vueparams,
        }).then(data => {
          for (var k in data) {
            if (Array.isArray(data[k])) {
              this[k] = data[k];
            } else {
              $.extend(this[k], data[k]);
            }
          }
        })
      },
      inventoryDifListSubmit(_params) {
        this.$confirm("确认差异提交", "警告").then(() => {
          request({
            method: 'post',
            url: '/xcapi/VUEAction/psi/main/InventoryAction/inventoryDifListSubmit?' + _params + this.vueparams,
            data: this.postData()
          }).then(data => {
            this.$router.replace("/redirect" + this.$route.fullPath);
            this.msgSuccess(data.msg);
          })
        });
      },
    },
  }
</script>
